<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
<title>医院管理平台</title>
<link rel="icon" href="/behindstatic/images/favicon.ico" type="image/ico">
<meta name="keywords" content="医院管理平台">
<meta name="description" content="医院管理平台">
<meta name="author" content="yinqi">
<link href="/behindstatic/css/bootstrap.min.css" rel="stylesheet">
<link href="/behindstatic/css/materialdesignicons.min.css" rel="stylesheet">
<!--标签插件-->
<link rel="stylesheet" href="/behindstatic/js/jquery-tags-input/jquery.tagsinput.min.css">
<link href="/behindstatic/css/style.min.css" rel="stylesheet">
</head>
  
<body>
    <!--页面主要内容-->
    <main class="lyear-layout-content" style="margin: 0 -98px;">
     <h1 style="text-align: center;">管理员注册</h1>
      <div class="container-fluid">
        <div class="row">
          <div class="col-lg-12">
            <div class="card">
              <div class="card-body">
                <form action="/login/admin_Register" method="post" class="row"  >
                    <div class="form-group col-md-12">
                        <label for="mima">账号</label>
                        <input type="text" class="form-control" id="zhanghao" name="username"  placeholder="请输入账号" />
                    </div>
                   <div class="form-group col-md-12">
                      <label for="mima">密码</label>
                      <input type="password" class="form-control" id="mima" name=password  placeholder="请输入密码" />
                    </div>
                    <div class="form-group col-md-12">
                      <label for="qmima">确认密码</label>
                      <input type="password" class="form-control" id="qmima"  placeholder="请确认新密码" />
                    </div>
                    <div class="form-group col-md-12">
                      <button type="button" class="btn btn-primary" target-form="add-form" onclick="uploadVidoe()">确 定</button>
                    </div>
                </form>
              </div>
            </div>
          </div>
          
        </div>
        
      </div>
      
    </main>
    <!--End 页面主要内容-->


<script type="text/javascript" src="/behindstatic/js/jquery.min.js"></script>
<script type="text/javascript" src="/behindstatic/js/bootstrap.min.js"></script>
<!--标签插件-->
<script src="/behindstatic/js/jquery-tags-input/jquery.tagsinput.min.js"></script>
<script>
  function uploadVidoe() {
            var zhanghao     =  document.getElementById("zhanghao").value;
            var mima   = document.getElementById("mima").value;
            var qmima   = document.getElementById("qmima").value;
              if(zhanghao == null || zhanghao == ''){
                  alert("请输入账号");
                  return;
             }     
             if(mima == null || mima == ''){
                 alert("请输入密码");
                 return;
             }
             if(qmima == null || qmima == ''){
                 alert("请输入密码");
                 return;
             }
             if(mima != qmima){
                 alert("两次密码不一致");
                 return;
               }
             $.ajax({
                 type: "get",
                 url: "/login/mimaUpate?zhanghao="+zhanghao,
                 success: function (data) {
                     if (data.pan == "ok") {
                    	   $("form").submit();
                     } else {
                         alert("该账号存在");
                     }
                 }
             });
          
  }

</script>



</body>
</html>